package com.ruoyi.behindDoctor.controller;

import com.ruoyi.behindDoctor.domain.yDocDepartment;
import com.ruoyi.behindDoctor.service.IyDocDepartmentService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/behindDoctor/department")
public class yDocDepartmentController {

    @Autowired
    private IyDocDepartmentService departmentService;

    /**
     * 获取所有科室下拉数据
     */
    @GetMapping("/dropdown")
    public AjaxResult getDepartmentDropdown() {
        List<yDocDepartment> departments = departmentService.getAllDepartments();
        return AjaxResult.success(departments);
    }
}